import { createApp } from 'vue'
import { createPinia } from 'pinia'
// 导入Pinia持久化插件
import persist from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'

// 引入懒加载指令插件并且注册
import { lazyPlugin } from '@/directives/index.js'
// 引入组件插件
// import { componentPlugin } from '@/components'

// 样式初始化文件
import '@/styles/reset.scss'

const app = createApp(App)

const pinia = createPinia()
pinia.use(persist)
app.use(pinia)
app.use(router)
app.use(lazyPlugin) // 懒加载绑定到vue
// app.use(componentPlugin) // 组件插件绑定
app.mount('#app')
